import { configureStore } from "@reduxjs/toolkit";
import countReducer from "./count/count.jsx";
import { userReducer } from "./user/user.jsx";
import persistStore from "redux-persist/es/persistStore";
export const store = configureStore({
  reducer: {
    counter: countReducer,
    user: userReducer,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: {
        // 忽略 redux-persist 的动作类型
        ignoredActions: ["persist/PERSIST"],
      },
    }),
});

export const persistor = persistStore(store);
